package design.factory;

import sun.security.jca.GetInstance;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/21
 * <p>
 * \* Time: 11:23
 * <p>
 * \* Description:
 * \
 */
public class HumanFactory extends AbstractHumanFactory {
    @Override
    public <T extends Human> T createHuman(Class<T> c) {
        Human human = null;
        try {
            human = c.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return (T) human;
    }
}
